package com.levi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author shentong
 * @since 2022/3/15 8:51 PM
 */
@EqualsAndHashCode(callSuper = true)
@TableName("mall_category")
@Data
public class Category extends BaseEntity{

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("parent_id")
    private Integer parentId;

    @TableField("name")
    private String name;

    @TableField("status")
    private Integer status;

    @TableField("sort_order")
    private Integer sortOrder;

    @TableField(exist = false)
    @ApiModelProperty("子类目")
    private List<Category> subCateories;

}
